package object_;


import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class objectoutput_ {
    public static void main(String[] args) throws IOException {
        String pathname="d:\\next5.dat";
        ObjectOutputStream objectOutputStream=new ObjectOutputStream(new FileOutputStream(pathname));
        objectOutputStream.writeInt(100);
        objectOutputStream.writeFloat(1);
        objectOutputStream.writeDouble(11.1);
        objectOutputStream.writeBoolean(true);
        objectOutputStream.writeObject(new Dog("狗剩",12));
        objectOutputStream.close();
        System.out.println("ok");
    }
}
